<?php
class Post extends ORM 
{
	public $table = 'posts';
	
	public $has_one = array(
		'user',
	    'topic' => array(
	        'class' => 'post',
	        'other_field' => 'reply'
	    )
	);
	
	public $has_many = array(
	    'reply' => array(
			'class' => 'post',
	        'other_field' => 'topic'
	    )
	);  
	
	public function __construct($id = NULL)
	{
		parent::__construct($id);
	}
}
?>